import { do_start, do_over } from './ready';
import { g_stepnum } from 'db/state';

const do_event = (st, umd, watch) => {
    const stepnum = g_stepnum();

    umd.set_st(st);

    if (st === "step_start") {
        do_start(stepnum, umd, watch);
    }
    else if (st === "step_over") {
        umd.setErr("");
        do_over(stepnum, umd, watch);
    }
};

export {do_event};
